#! /usr/bin/env python

# -*- coding: utf-8 -*-

import os
import sys
sys.path.append(os.path.abspath(os.path.dirname(__file__)))

import web
import config


urls = (
	'/', 						'application.controllers.api.index',
	'/pre',						'application.controllers.api.pre',
	'/login',					'application.controllers.api.login',
	'/verify',					'application.controllers.api.verify',
	'/intro',					'application.controllers.api.info',
	'/info',					'application.controllers.api.info',
	'/table',					'application.controllers.api.table',
	'/exam',					'application.controllers.api.exam',
	'/score',					'application.controllers.api.score',
)
web.config.debug = config.debug_mode
app = web.application(urls, globals(),autoreload=True)

if __name__ == "__main__":
	web.wsgi.runwsgi = lambda func, addr=None: web.wsgi.runfcgi(func, addr)
	app.run()
